<form method="post" action="<{link app=sms ctl=admin_sms act=signup}>" id='messenger-sms-form' >
<div class="division" id="stepOne">
    <table class="tableform" border="0" cellpadding="0" cellspacing="0" >
        <tr>
            <th ><{t}>账号：<{/t}></th>
            <td>
                <{input type="text" name="sms_code_num" value="{$sms_code.sms_code_num}" vtype="required"}>
                <span><{t}><{/t}></span>
            </td>
        </tr>
        <tr>
            <th ><{t}>密码：<{/t}></th>
            <td>
                <{input type="text" name="sms_code_psw" value="{$sms_code.sms_code_psw}" vtype="required"}>
                <span><{t}><{/t}></span>
            </td>
        </tr>
    </table>
    <div class="table-action">
		<{button label=$___b2c="保存"|t:'b2c' type="submit" id="sms-form-submit"}>
    </div>
</div>
</form>
<script>
   (function(){
    var _form = $('messenger-sms-form');
    var btn =$('sms-form-submit');
    _form.store('target',{
        onRequest:function() {
        },
        onComplete:function(){

        },
        onSuccess:function(response){
            var hash_res_obj = JSON.decode(response);
            if (hash_res_obj.success != undefined && hash_res_obj.success != "")
            {
                try{
                    var _dialogIns = btn.getParent('.dialog').retrieve('instance');
                }catch(e){}

                if(_dialogIns)
                {
                    _dialogIns.close();
                }
            }else{
                alert(hash_res_obj.ecode);
            }
        }
    });
})();

</script>